home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Online / RCFTPd / Install < prev    next >
Text File  |  2002-03-12  |  5KB  |  188 lines

  1. ; Install script for Bump
  2. ; ©1999 Robin Cloutman
  3.  
  4. (set @default-dest "C:")
  5.  
  6. ;---------------------------------------------------------------------------
  7. ;(if (= @language "english)
  8. ;(
  9. (set #setup-text "Checking system and application...")
  10.  
  11. (set #dest-prompt "Where do you want to install RC-FTPd?\n(A new drawer will NOT be created)")
  12. (set #dest-help "It doesn't matter where you put this,\nalthough I strongly suggest you\ndon't hide it 30 levels down...")
  13.  
  14. (set #cpu-prompt "Which version of RC-FTPd do you wish to install?")
  15. (set #cpu-help "Unless you have some reason to choose\na different version, best leave\nthis to the default version.\n(The 68000 version is safe for all cpu's)")
  16.  
  17. (set #patch-prompt "Patching the executable")
  18. (set #patch-help "Got to do this for your CPU")
  19.  
  20. (set #install-prompt "Installing RC-FTPd...")
  21. (set #install-help "It's pretty useless without this...")
  22.  
  23. (set #help-prompt "Installing the Guide...")
  24. (set #help-help "This one isn't updated every time the main\nprogram is, however whenever it\nis I bump the version to match\nthe server...")
  25.  
  26. (set #screenshot-prompt "Installing the Screenshots...")
  27. (set #screenshot-help "These files are linked from the guide,\nif you know what you're doing then they're\nnot needed...")
  28.  
  29. (set #mui-prompt "Checking MUI libs...")
  30. (set #mui-help "It's pretty useless without these...")
  31.  
  32. (set #icon-prompt "Installing the default icon...")
  33. (set #icon-help "Eye candy for Workbench 3.5+ users,\nyou'll need to be running HappyEnv or env-handler\nto be able to use this right off,\notherwise copy the icon from ENVARC: to ENV:...")
  34.  
  35. (set #locale-prompt "Copying other languages...\n(English built in)")
  36. (set #locale-help "Just choose the languages you wish installed...")
  37.  
  38. (set #key-prompt "Installing the RC-FTPd keyfile...")
  39. (set #key-help "Well, why don't you want to install it,\nit's not as if you really want to use\nall the features anyway...")
  40.  
  41. (set #readme-prompt "Reading a relevent file")
  42. (set #readme-help "Erm? Help? Anyone???")
  43. ;)
  44. ;---------------------------------------------------------------------------
  45.  
  46. (if (= (exists "ftpd") 0)(abort "ERROR - Cannot find default executable!!!"))
  47.  
  48. (welcome)
  49.  
  50. (complete 0)
  51.  
  52. (working #setup-text)
  53. (set #cpu (substr (database "cpu") 3 1))
  54. (if (>= @user-level 1)
  55.     (
  56.         (if (> #cpu 5)(set #cpu (- #cpu 1)))
  57.         (if (> #cpu 2)(set #cpu (- #cpu 1)))
  58.         (if (> #cpu 0)(set #cpu (- #cpu 1)))
  59.         (set #cpu
  60.             (askchoice
  61.                 (choices "68000" "68020" "68040" "68060")
  62.                 (default #cpu)
  63.                 (prompt #cpu-prompt)
  64.                 (help #cpu-help)
  65.             )
  66.         )
  67.         (if (= #cpu 1)(set #cpu 2))
  68.         (if (= #cpu 2)(set #cpu 4))
  69.         (if (= #cpu 3)(set #cpu 6))
  70.     )
  71. )
  72.  
  73. (complete 25)
  74.  
  75. (if (>= @user-level 1)
  76.     (set @default-dest
  77.         (askdir
  78.             (prompt #dest-prompt)
  79.             (help #dest-help)
  80.             (default @default-dest)
  81.         )
  82.     )
  83. )
  84.  
  85. (complete 50)
  86.  
  87. (run "Copy ftpd.info T:")
  88. (if (= #cpu 0)
  89.     (run "Copy ftpd T:")
  90.     (
  91.         (set #file (cat "ftpd_0" #cpu "0.pch"))
  92.         (if (= (exists #file) 1)(run (cat "spatch -oT:ftpd -p" #file " ftpd")))
  93.     )
  94. )
  95. (copylib
  96.     (prompt #install-prompt)
  97.     (help #install-help)
  98.     (source "T:ftpd")
  99.     (dest @default-dest)
  100.     (newname "ftpd")
  101.     (infos)
  102.     (noposition)
  103.     (if (>= @user-level 2)(confirm))
  104. )
  105.  
  106. (copylib
  107.     (prompt #help-prompt)
  108.     (help #help-help)
  109.     (source "ftpd.guide")
  110.     (dest @default-dest)
  111.     (infos)
  112.     (noposition)
  113.     (if (>= @user-level 1)(confirm))
  114. )
  115.  
  116. (copyfiles
  117.     (prompt #screenshot-prompt)
  118.     (help #screenshot-help)
  119.     (source "")
  120.     (pattern "pic_#?.iff")
  121.     (dest @default-dest)
  122.     (optional nofail)
  123.     (if (>= @user-level 1)(confirm))
  124. )
  125.  
  126. (complete 70)
  127.  
  128. (if (= (exists "libs/mui") 2)
  129.     (foreach "libs/mui/" "#?.mc(c|p)"
  130.         (copylib
  131.             (prompt #mui-prompt)
  132.             (help #mui-help)
  133.             (source (cat "libs/mui/" @each-name))
  134.             (dest "Libs:mui/")
  135. )))
  136.  
  137. (complete 80)
  138.  
  139. (if (= (exists "ENVARC/Sys/def_rc-ftpd.info") 1)
  140.     (copyfiles
  141.         (prompt #icon-prompt)
  142.         (help #icon-help)
  143.         (source "ENVARC/Sys/def_rc-ftpd.info")
  144.         (dest "ENVARC:Sys/")
  145.         (if (>= @user-level 2)(confirm))
  146. ))
  147.  
  148. (complete 85)
  149.  
  150. (copyfiles
  151.     (prompt #locale-prompt)
  152.     (help #locale-help)
  153.     (source "Catalogs")
  154.     (pattern "~(ftpd.c?)")
  155.     (dest "Locale:Catalogs/")
  156.     (optional nofail)
  157.     (if (>= @user-level 1)(confirm))
  158. )
  159.  
  160. (complete 90)
  161.  
  162. (if (= (exists (tackon @default-dest "ftpd.key")) 0)
  163.     (if (= (exists "ftpd.key") 1)
  164.         (copyfiles
  165.             (prompt #key-prompt)
  166.             (help #key-help)
  167.             (source "ftpd.key")
  168.             (dest @default-dest)
  169.             (if (>= @user-level 2)(confirm))
  170. )))
  171.  
  172. (complete 95)
  173.  
  174. (if (= (exists "Thanks.txt") 1)
  175.     (run "Run More Thanks.txt"
  176.         (prompt #readme-prompt)
  177.         (help #readme-help)
  178.     )
  179.     (if (= (exists "ftpd.readme") 1)
  180.         (run "More ftpd.readme"
  181.             (prompt #readme-prompt)
  182.             (help #readme-help)
  183. )))
  184.  
  185. (complete 100)
  186.  
  187. (exit "Installation complete\n\nRC-FTPd has been installed in " @default-dest (quiet))
  188.